cmake_minimum_required(VERSION 3.4.1)

set(lib_DIR ${CMAKE_SOURCE_DIR}/src/main/jniLibs)
include_directories(${CMAKE_SOURCE_DIR}/includes)

add_library(MNN SHARED IMPORTED)
set_target_properties(
        MNN
        PROPERTIES IMPORTED_LOCATION
        ${lib_DIR}/${ANDROID_ABI}/libMNN.so
)

file(GLOB_RECURSE CPP_SRCS src/main/cpp/*.cpp)
add_library(mnncore SHARED ${CPP_SRCS})

find_library(log-lib log)
find_library(jnigraphics-lib jnigraphics)

add_definitions(-DMNN_USE_LOGCAT)
target_link_libraries(mnncore MNN ${log-lib} ${jnigraphics-lib})